
public class EquipInventory {

    Item[] inv = new Item[14];

    EquipInventory() {
    }

    public boolean addItem(Item i) {//for empty inv slots
        if (i.getHealing()) {
            return false;
        }
        if (inv[i.getType()] != null) {
            return false;
        }
        inv[i.getType()] = i;
        return true;
    }

    public Item swapItem(Item i) {//for used inv slots
        if (inv[i.getType()] == null) {
            return null;
        }

        if (i.getHealing()) {
            return null;
        }

        Item temp = inv[i.getType()];
        inv[i.getType()] = i;
        return temp;

    }
}
